package com.example.shippxy.utils;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

public class DateUtils {

    public static String tamp2Date(Long timestamp){
        Instant instant = Instant.ofEpochMilli(timestamp);
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String strDate = formatter.format(LocalDateTime.ofInstant(instant, ZoneId.systemDefault()));
        return strDate;
    }
}
